<?php

function IsThumbnailBigEnough($thumbnailId)
{
    $isBigEnough = false;
    $thumbnailPath = get_attached_file($thumbnailId);
    if ($thumbnailPath && getimagesize($thumbnailPath))
    {
        list($originalWidth, $originalHeight) = getimagesize($thumbnailPath);
        $isBigEnough = (($originalWidth >= 220) && ($originalHeight >= 150));
    }
    return $isBigEnough;
}
